home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
050a.dms
/
050a.adf
/
EXAMPLE_PROGRAMS
/
example16.AMOS
/
example16.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
1KB
|
60 lines
'=====================
'eaxmple16.Amos
'=====================
'demonstration of a few system commands introduced in chapter 16
'I have not commented on parts you should easily understand.
Flash Off : Curs Off : Hide : Paper 0 : Cls 0
Rem This executes a little subroutine that displays the current memory
Rem available. It's in a subroutine as we are going to use it more than
Rem once in this program.
'-----------------------------------------------------------------------
Gosub PM
Wait 100
Pen 4
Print
Print "NOW CLOSING WORKBENCH AND EDITOR"
Wait 100
Close Workbench
Close Editor
Pen 5
Gosub PM
Wait 100
Pen 6
Print : Print "NOW DISABLING BREAK KEY," : Print "TRY PRESSING CTRL+C "
Pen 7
Print : Print "CLICK MOUSE WHEN READY TO CONTINUE"
Break Off
While Mouse Key=0 : Wend
Pen 13
Print : Print "NOW RESETTING AMOS TO DEFAULT"
Wait 100
Default
Rem I have put the STOP here otherwise the program will run past here and
Rem execute the PM subroutine an extra time, not fatal but untidy.
'--------------------------------------------------------------------------
Stop
Rem This is a little subroutine that gets all available memory
Rem CHIP and FAST ram and adds them together. MEM then equals total memory
Rem available which is printed and a K is stuck on the end for good measure.
'---------------------------------------------------------------------------
PM:
MEM=Chip Free+Fast Free
Print : Print "CURRENT MEMORY (CHIP+FAST) =";MEM;"K"
Return